package me.a_littlesquid.origin.utils;

import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;

import java.io.File;
import java.util.Set;

public class check {
    public static boolean hasorigin(Player player, FileConfiguration data, File filedata){
        ConfigurationSection configurationSection=data.getConfigurationSection("playerlist");
        Set<String> list=configurationSection.getKeys(false);
        String playername=player.getDisplayName();
        boolean result=false;
        for (String name:list){
            if (name.equalsIgnoreCase(playername)){
                result=true;
                break;
            }
        }
    return result;
    }
}
